#include "monitoringSystemLog.h"
#include "ui_monitoringSystemLog.h"
#include <QDesktopServices>
#include <QUrl>
monitoringSystemLog::monitoringSystemLog(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::monitoringSystemLog)
{
    ui->setupUi(this);

    connect(ui->pushButton,&QPushButton::clicked,this,[](){

        // 你要打开的文件夹路径
           QString folderPath = "C:\\Users\\62456\\Desktop\\c++\\project\\build-SnailIOTMonitoring-Desktop_Qt_5_14_2_MinGW_64_bit-Debug\\logs";

           // 将路径转换为 QUrl 对象
           QUrl url = QUrl::fromLocalFile(folderPath);

           // 尝试打开文件夹
           if (QDesktopServices::openUrl(url)) {
               // 打开成功
           } else {
               // 打开失败
           }
    });

}

monitoringSystemLog::~monitoringSystemLog()
{
    delete ui;
}
